/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Andrés Felipe
 */
@Embeddable
public class ProductStructurePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "productid")
    private int productid;
    @Basic(optional = false)
    @NotNull
    @Column(name = "productidc")
    private int productidc;

    public ProductStructurePK() {
    }

    public ProductStructurePK(int productid, int productidc) {
        this.productid = productid;
        this.productidc = productidc;
    }

    public int getProductid() {
        return productid;
    }

    public void setProductid(int productid) {
        this.productid = productid;
    }

    public int getProductidc() {
        return productidc;
    }

    public void setProductidc(int productidc) {
        this.productidc = productidc;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) productid;
        hash += (int) productidc;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ProductStructurePK)) {
            return false;
        }
        ProductStructurePK other = (ProductStructurePK) object;
        if (this.productid != other.productid) {
            return false;
        }
        if (this.productidc != other.productidc) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.ProductStructurePK[ productid=" + productid + ", productidc=" + productidc + " ]";
    }
    
}
